package client.gui;

import java.awt.Color;
import java.awt.Dimension;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JProgressBar;

public class TrackPanel extends ItemPanel {
	private JLabel trackLabel = new JLabel();
	private String albumName;
	private String artistName;
	private String trackName;
	private JProgressBar prog = new JProgressBar();
	
	public TrackPanel(String Artist, String Album, String track){
		//setLayout(null);
		init();
		albumName = Album;
		artistName = Artist;
		trackName = track;
		trackLabel.setText(trackName);
	}

	private void init() {
		add(trackLabel);
		add(prog);
		prog.setVisible(false);
		prog.setMaximum(120);
		setPreferredSize(new Dimension(750,30));
		setBorder(BorderFactory.createLineBorder(Color.black));
	}
	
	public String getArtist(){
		return artistName;
	}
	public String getAlbum(){
		return albumName;
	}

	private static final long serialVersionUID = -8755449732589463050L;

	public String getTrack() {
		return trackName;
	}

	public void incrementProgress() {
		prog.setVisible(true);
		prog.setValue(prog.getValue()+1);
	}


}
